//
//  MYGShareReportNotiCell.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/4/11.
//

import UIKit

class MYGShareReportNotiCell: UIView {
    
//    nameLabel.text = title
//    timeLabenl.text = subTitle
//    icon.image = UIImage(named: imageStr)
    
    // MARK: - init
    override init(frame: CGRect) {
        super.init(frame: frame)
        configUI()

    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - UI
    private func configUI() {
        backgroundColor = .rgba(240, 240, 240, 1)
        
        addSubview(rView)
        addSubview(icon)
        addSubview(nameLabel)
        addSubview(line)
        addSubview(contentLabel)
        addSubview(timeLabenl)
        
        rView.snp.makeConstraints { make in
            make.width.height.equalTo(15)
            make.left.top.equalToSuperview()
        }
      
        nameLabel.snp.makeConstraints { make in
            make.left.equalTo(rView.snp.right).offset(8.5)
            make.centerY.equalTo(rView)
            make.height.equalTo(20)
        }
        line.snp.makeConstraints { make in
            make.top.equalTo(rView.snp.bottom).offset(-5)
            make.width.equalTo(1)
            make.bottom.equalToSuperview()
            make.centerX.equalTo(rView)
        }
        icon.snp.makeConstraints { make in
            make.left.equalTo(nameLabel)
            make.width.height.equalTo(45)
            make.top.equalTo(nameLabel.snp.bottom).offset(13)
        }
        contentLabel.snp.makeConstraints { make in
            make.left.equalTo(icon.snp.right).offset(11.5)
            make.top.equalTo(icon)
            make.height.equalTo(22.5)
        }
        timeLabenl.snp.makeConstraints { make in
            make.left.equalTo(icon.snp.right).offset(11.5)
            make.top.equalTo(contentLabel.snp.bottom).offset(5)
            make.height.equalTo(22.5)
        }
        
    }
    
    // MARK: - lazy load
    private lazy var rView: UIImageView = {
        let imgV = UIImageView()
        imgV.image = UIImage(named: "doctorDetail_tips")
        imgV.layer.masksToBounds = true
        imgV.layer.cornerRadius = 4
        return imgV
    }()
    
     lazy var icon: UIImageView = {
        let imgV = UIImageView()
        imgV.image = UIImage(named: "head")//normal_cion
        imgV.layer.masksToBounds = true
        imgV.layer.cornerRadius = 4
        return imgV
    }()

     lazy var nameLabel: UILabel = {
        let label = UILabel()
        label.font = .medium(14)
        label.textColor = .rgba(74, 74, 74, 1)
        label.text = "申请人"
        return label
    }()
    
    private var line:UIView = {
        let l = UIView()
        l.backgroundColor = .rgba(162, 146, 254, 1)
        return l
    }()
    
     lazy var contentLabel: UILabel = {
        let label = UILabel()
        label.font = .regular(16)
        label.textColor = .rgba(44, 44, 44, 1)
        label.text = "乔淑琴 北京友谊医院 心内科"
        return label
    }()
    
     lazy var timeLabenl: UILabel = {
        let label = UILabel()
        label.font = .regular(12)
        label.textColor = .rgba(88, 88, 88, 1)
        label.text =  "2023年07月05日 09:45"
        return label
    }()
    
    
    
}
